Skip to content

PHOENIX-5215 Migrate from HTrace to OpenTelemetry tracing#2394

Open
xavifeds8 wants to merge 1 commit intoapache:masterfrom
xavifeds8:feature/opentel/phase1-clean
Open

PHOENIX-5215 Migrate from HTrace to OpenTelemetry tracing#2394
xavifeds8 wants to merge 1 commit intoapache:masterfrom
xavifeds8:feature/opentel/phase1-clean

Conversation

@xavifeds8
Copy link

@xavifeds8 xavifeds8 commented Mar 17, 2026

This PR replaces the deprecated Apache HTrace tracing system with OpenTelemetry, following the same proven pattern that Apache HBase adopted in HBASE-22120. Phoenix now depends only on the OpenTelemetry API at compile time (scope=provided), with the SDK provided at runtime by the OpenTelemetry Java Agent. When no agent is attached, all tracing calls are no-ops with zero overhead.

@xavifeds8 xavifeds8 changed the title PHOENIX-5215 Migrate from HTrace to OpenTelemetry tracing WIP PHOENIX-5215 Migrate from HTrace to OpenTelemetry tracing Mar 18, 2026
@xavifeds8 xavifeds8 force-pushed the feature/opentel/phase1-clean branch 2 times, most recently from 8ae70d1 to d4fd4bf Compare March 23, 2026 04:50
@xavifeds8 xavifeds8 changed the title WIP PHOENIX-5215 Migrate from HTrace to OpenTelemetry tracing PHOENIX-5215 Migrate from HTrace to OpenTelemetry tracing Mar 23, 2026
@xavifeds8 xavifeds8 force-pushed the feature/opentel/phase1-clean branch from d4fd4bf to 433e477 Compare March 23, 2026 06:27
@xavifeds8
Copy link
Author

@stoty , @virajjasani
Can you please review on this approach for the migration of htrace into opentelemetry.
This is a initial migration PR in the Future PR's i will be working on.

  1. Depreciation TRACE ON, TRACE OFF through SQL Statement.
  2. Adding in more Semantic Attributes in tracing through opentemetry-semconv
  3. Adding in the test cases.
  4. Standarising the span names as per Otel conventions.
  5. Updating the https://phoenix.apache.org/tracing.html website.

setup gist: <script src="https://gist.github.com/xavifeds8/b7e8bcb7707844a1e106686559f04ccd.js"></script>

Please tell me if the approach seems good to you or you see any issues in the approach.
Any suggestions or improvement in the approach are welcome.

@virajjasani
Copy link
Contributor

Nice work @xavifeds8! The approach seems good. IIUC, this PR only moves from HTrace to OpenTelemetry and in the next set of PRs, you would add more spans?

Could you fix spotless issues and ASF license warnings reported in the latest build?

@xavifeds8
Copy link
Author

xavifeds8 commented Mar 24, 2026

Nice work @xavifeds8! The approach seems good. IIUC, this PR only moves from HTrace to OpenTelemetry and in the next set of PRs, you would add more spans?

Could you fix spotless issues and ASF license warnings reported in the latest build?

Hey @virajjasani thanks for the reviewing the approach.
Currently i have migrated the spans that existed in Htrace. I will be adding some more spans to fill in any gaps following that i will be working on the tasks mentioned above. also i will be fixing the spotless and the license issues now.

Also, I wanted to ask about how to handle upcoming commits. Should I continue pushing them to the same PR that i have raised? I’m concerned that might make the review process a bit overwhelming. Alternatively, would it be better to create a feature branch and i will raise PRs there? What would you suggest?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants